package com.firexxx.vp.domain.cluster;

import com.firexxx.common.errors.BaseErrors;
import com.firexxx.vp.adapter.engine.ClusterEngineFacede;
import com.firexxx.vp.domain.vp.VoicePrintResourceType;
import com.firexxx.vp.utils.BeanUtil;

/**
 * @description: TODO
 * @throws:
 * @author: zhuangzhang2
 * @date: 2019/12/23 19:37
 */
public class ClusterEngineFactory {

    public static ClusterEngineInterface getInstance(VoicePrintResourceType vpResourceType) {
        if (vpResourceType == VoicePrintResourceType.PNCC) {
            return BeanUtil.getBean(ClusterEngineFacede.class);
        }

        throw BaseErrors.CLUSTER_ERROR.getThrow(
                "不支持的cluster引擎资源类型"
        );
    }
}